package com.example.xianji.activity;

import android.os.Bundle;
import android.app.Activity;
import android.util.Log;
import android.view.View;
import android.view.View.OnClickListener;
import android.webkit.WebView;
import android.widget.ImageView;
import android.widget.TextView;

import com.example.xianji.R;

public class Main_UrlActivity extends Activity {
    private WebView mUrl_webview;
    private ImageView url_back;
    private TextView url_title;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main__url);
        mUrl_webview = (WebView) findViewById(R.id.url_webview);
        url_back = (ImageView) findViewById(R.id.url_back);
        url_title = (TextView) findViewById(R.id.url_title);

        if (getIntent().getIntExtra("webview_number", 0) == 0) {
            url_title.setText("技术成果转化");
        } else if (getIntent().getIntExtra("webview_number", 0) == 1) {
            url_title.setText("贤集网参展上交会");
        } else if (getIntent().getIntExtra("webview_number", 0) == 2) {
            url_title.setText("军民融合");
        } else if (getIntent().getIntExtra("webview_number", 0) == 3) {
            url_title.setText("技术对接");
        } else if (getIntent().getIntExtra("webview_number", 0) == 4) {
            url_title.setText("资金担保");
        }
        mUrl_webview.loadUrl(getIntent().getStringExtra("webview_url"));
        mUrl_webview.getSettings().setJavaScriptEnabled(true);
        url_back.setOnClickListener(new OnClickListener() {

            @Override
            public void onClick(View v) {
                Main_UrlActivity.this.finish();
            }
        });
    }
}
